<template>
	<view style="padding: 0 72rpx;padding-top: 180rpx;">
		<view style="">
			<u-image src="/static/login/loginLog.svg"
				style="display: flex;flex-direction: row;" width="65%"
				height="auto" mode="widthFix"></u-image>
		</view>
		<!-- <u--input style="margin-top: 80rpx;" :placeholder="$t('registration_phone')" prefixIcon="/static/login/phone.png"
			:prefixIconStyle="{width:'25rpx','padding-right':'15rpx'}" border="bottom" clearable></u--input> -->
		<!-- <view style="display: flex;flex-direction: row;margin-top: 80rpx;align-items: center;justify-content: center;">
			<u--input style="flex: 1;margin-right: 30rpx;" :placeholder="$t('registration_msg')" prefixIcon="/static/xinfeng.png"
				:prefixIconStyle="{width:'32rpx',height:'28rpx','padding-right':'15rpx'}" border="bottom" clearable></u--input>
			<u-button color="#2A3954" @click="" :customStyle="{'height':'64rpx','border-radius':'40rpx','width':'160rpx','font-size':'36rpx'}" :text="$t('registration_sign')"></u-button>
		</view> -->
		<u-input style="margin-top: 80rpx;" :customStyle="{'padding-left':'10rpx'}" v-model="query.Email" :placeholder="$t('registration_email')" border="bottom" clearable>
			<u-icon slot="prefix" size="25" name="email"></u-icon>
		</u-input>
		<u-input style="margin-top: 80rpx;" :customStyle="{'padding-left':'10rpx'}" v-model="query.FullName" :placeholder="$t('registration_username')" border="bottom" clearable>
			<u-icon slot="prefix" size="25" name="account"></u-icon>
		</u-input>
		<u-input style="margin-top: 80rpx;" :customStyle="{'padding-left':'10rpx'}" v-model="query.OrgCode" :placeholder="$t('registration_orgCode')" border="bottom" clearable>
			<u-icon slot="prefix" size="25" name="edit-pen"></u-icon>
		</u-input>
		<u-input v-model="query.Password" :customStyle="{'padding-left':'10rpx'}" style="margin-top: 80rpx;" :placeholder="$t('registration_pass')" v-show="passtype" suffixIcon="/static/login/passsee.png" type="password" border="bottom" >
			<u-icon slot="prefix" size="25" name="lock-open"></u-icon>
			<template slot="suffix">
				<u-icon size="20" width="20" height="10" name="/static/login/passnosee.png" @click="settype"></u-icon>
			</template>
		</u-input>
		<u-input v-model="query.Password" :customStyle="{'padding-left':'10rpx'}" style="margin-top: 80rpx;" :placeholder="$t('registration_pass')" v-show="!passtype"
			suffixIcon="/static/login/passsee.png" type="text" border="bottom" >
			<u-icon slot="prefix" size="25" name="lock-open"></u-icon>
			<template slot="suffix">
				<u-icon size="20" width="22" height="16" name="/static/login/passsee.png" @click="settype"></u-icon>
			</template>
		</u-input>
		<u-button color="#2A3954" @click="getdata" :customStyle="{'height':'82rpx','border-radius':'30rpx','margin-top':'140rpx','font-size':'36rpx'}" :text="$t('registration_sign')"></u-button>
		<view style="display: flex;margin-top: 55rpx;font-size: 24rpx;color: #2A3954;align-items: center;justify-content: center;">
			<text style="font-size: 30rpx;color: #010101;">{{$t('registration_tip')}}</text><text @click="$u.route({url:'/pages/login/login',type:'back'})" style="color: #337fff;padding-left: 10rpx; font-size: 30rpx;">{{$t('registration_tiptap')}}</text>
		</view>
	</view>
	
</template>

<script>
	export default {
		data() {
			return {
				passtype:true,
				query:{
				  "Email": "",
				  "FullName": "",
				  "Password": "",
				  "OrgCode": "",
				  "Phone": "",
				  "Language": "",
				  "TimeOffset": 8,
				  "AppID": "119"
				}
			};
		},
		methods:{
			settype(){
				if(this.passtype){this.passtype = false}else{this.passtype = true}
			},
			settype1(){
				if(this.passtype1){this.passtype1 = false}else{this.passtype1 = true}
			},
			getdata(){
				this.$store.commit('postdata',{
					url:'/api/Manager/SignUp',
					data:this.query,
					success(res){
						uni.$u.toast(res.Message);
						if(res.State == 0){
							setTimeout(()=>{
								uni.$u.route({
									url:'/pages/login/login',
									type:'back'
								})
							},1500)
						}
					},
					error(res){
						uni.$u.toast('server error');
					}
				})
			}
		}
	}
</script>
<style>
	.u-border-bottom {
		border-color: #2A3954 !important;
		border-width: 1px !important;
	}
</style>
<style lang="scss">

</style>
